<?php
/**
 * Created by PhpStorm.
 * User: pc
 * Date: 2025/2/14
 * Time: 13:58
 */
namespace app\modules\setting\configs\auth;

class OfficeConfig
{

    /**
     * @return array
     * 获取搜索表单配置
     */
    public static function getSearchConfig(){
        return [
            [
                "component" => "FormInput",
                "field" => "name",
                "label" => "产品名称",
                "placeholder" => "产品名称",
                "allowClear" => true,
            ],

        ];
    }

    /**
     * @return array
     * 获取表格的操作
     */
    public static function getTableActions(){
        return  [

        ];
    }

    /**
     * @return array
     * 获取表格行的操作
     * [] 表示要id, ["*"] 表示要一行记录,参数名record, ["id"] 指定需要的参数 ， selected_ids 表示需要所有选择的id
     * configParamsField 规定请求的时候带上数据行中的那些参数，只需要字段名
     */
    public static function getTableRowAction(){
        return [

        ];
    }

    /**
     * @return array
     * 获取表格配置
     */
    public static function getTableConfig(){
        return [
            "rowKey" => "id",
            "columns" => [
                [
                    "title" => "机构",
                    "dataIndex" => "nickname",
                    "sorter" => true,
                    "key" => "nickname",
                    "format" => "raw",
                ],
                [
                    "title" => "选品数量",
                    "dataIndex" => "selected_num",
                    "sorter" => true,
                    "key" => "selected_num",
                    "format" => "raw",
                ],
                [
                    "title" => "带货中的产品",
                    "dataIndex" => "selected_product_num",
                    "sorter" => true,
                    "key" => "selected_product_num",
                    "format" => "raw",
                ],
                [
                    "title" => "拍摄视频数",
                    "dataIndex" => "video_num",
                    "sorter" => true,
                    "key" => "video_num",
                    "format" => "raw",
                ],
                [
                    "title" => "机构tiktok账号数",
                    "dataIndex" => "tiktok_num",
                    "sorter" => true,
                    "key" => "tiktok_num",
                    "format" => "raw",
                ],
            ],
            "actions" => self::getTableRowAction()
        ];
    }

    /**
     * 首页配置
     */
    public static function configIndex(){
        return [
            //搜索表单配置
            "searchConfig" => self::getSearchConfig(),
            // 操作配置 configParams 规定请求的时候带上那些参数
            "actionDivConfig" => self::getTableActions(),
            //表格配置
            "tableConfig" => self::getTableConfig(),
        ];
    }







}